package com.qianfeng.model;

import javax.persistence.*;
import java.io.Serializable;
import java.util.Objects;

@Entity
@Table(name = "sys_role", schema = "wfx")
public class SysRole implements Serializable {
    private String roleCode;
    private String roleName;
    private String roleDesc;
    private Integer roleOrder;
    private Integer roleType;
    private String roleFlag;

    @Id
    @Column(name = "role_code")
    public String getRoleCode() {
        return roleCode;
    }

    public void setRoleCode(String roleCode) {
        this.roleCode = roleCode;
    }

    @Basic
    @Column(name = "role_name")
    public String getRoleName() {
        return roleName;
    }

    public void setRoleName(String roleName) {
        this.roleName = roleName;
    }

    @Basic
    @Column(name = "role_desc")
    public String getRoleDesc() {
        return roleDesc;
    }

    public void setRoleDesc(String roleDesc) {
        this.roleDesc = roleDesc;
    }

    @Basic
    @Column(name = "role_order")
    public Integer getRoleOrder() {
        return roleOrder;
    }

    public void setRoleOrder(Integer roleOrder) {
        this.roleOrder = roleOrder;
    }

    @Basic
    @Column(name = "role_type")
    public Integer getRoleType() {
        return roleType;
    }

    public void setRoleType(Integer roleType) {
        this.roleType = roleType;
    }

    @Basic
    @Column(name = "role_flag")
    public String getRoleFlag() {
        return roleFlag;
    }

    public void setRoleFlag(String roleFlag) {
        this.roleFlag = roleFlag;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        SysRole sysRole = (SysRole) o;
        return Objects.equals(roleCode, sysRole.roleCode) &&
                Objects.equals(roleName, sysRole.roleName) &&
                Objects.equals(roleDesc, sysRole.roleDesc) &&
                Objects.equals(roleOrder, sysRole.roleOrder) &&
                Objects.equals(roleType, sysRole.roleType) &&
                Objects.equals(roleFlag, sysRole.roleFlag);
    }

    @Override
    public int hashCode() {
        return Objects.hash(roleCode, roleName, roleDesc, roleOrder, roleType, roleFlag);
    }
}
